
function statusHandle() {
	var isSubmitPaperyMaterial = $("input[name='isSubmitPaperyMaterial'][type='radio']:checked").val();
	if(isSubmitPaperyMaterial=='1') {
		$("input[name=status]:eq(1)").attr("checked",'checked');
		$("input[name=status]:eq(1)").attr("disabled",true);
		$("input[name=status]:eq(0)").attr("disabled",true);
	}else {
		$("input[name=status]:eq(0)").attr("checked",'checked');
		$("input[name=status]:eq(1)").attr("disabled",false);
		$("input[name=status]:eq(0)").attr("disabled",false);
	}
	//
}

function saveReason() {
	var reasonStr=$("#reason").val();
	var status = $("input[name='status'][type='radio']:checked").val();
	var isSubmitPaperyMaterial = $("input[name='isSubmitPaperyMaterial'][type='radio']:checked").val();
	if(status=='2' && reasonStr==''){
		alert("原因不能为空!");
		return;
	}
	$.ajax({
		async:false,
		url:'/admin/org!saveOrgReason.action',
		type:'post',
		data: {
			"id": id,
			"reason": reasonStr,
			"status": status,
			"isSubmitPaperyMaterial": isSubmitPaperyMaterial
		},
		dataType:'Text',
		cache: false,
		success:function(data){
			Interceptor(data);
			if(data!=null){
				alert("保存成功");
				location.href='/admin/organization_records/organization_records_audit.jsp';
			}
		},
		error:function(){
			//nexts(tag);
		}
    });
}

